/**
 * @description 组件样式
 * @author: 陈陈
 * @date: 2025/05/09
 * @phone: 18560000860
 * @email: 18560000860@qq.com
 * @company: 济南晨霜信息技术有限公司 /
 * @business: 承接前后端项目的开发
 */
.pure-checkbox {
    position: relative;
    display: inline-flex;
    flex-direction: var(--pure-checkbox-flex-direction, row);
    align-items: center;
    gap: var(--pure-checkbox-gap, 0.5em);
    margin: var(--pure-checkbox-margin);
    padding: var(--pure-checkbox-padding);
    overflow: hidden;

    &__box {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: var(--pure-checkbox-box-size, 1.25em);
        height: var(--pure-checkbox-box-size, 1.25em);
        border: var(--pure-checkbox-box-border-width, 1px) var(--pure-checkbox-box-border-style, solid) var(--pure-checkbox-box-border-color, var(--pure-border-color-gary));
        border-radius: var(--pure-checkbox-box-border-radius, 3px);
        position: relative;

        &::before {
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: var(--pure-checkbox-box-border-radius, 3px);
            background: var(--pure-checkbox-box-background);
            z-index: 0;
            opacity: var(--pure-checkbox-box-background-opacity);
        }
    }

    &__icon {
        font-size: var(--pure-checkbox-icon-font-size, 1em);
        color: var(--pure-checkbox-icon-color, rgba(0, 0, 0, 0));
        transform: var(--pure-checkbox-icon-transform, scale(0));
        opacity: var(--pure-checkbox-icon-opacity, 0);
        transition: var(--pure-checkbox-icon-transition, 0.3s);
        position: relative;
        z-index: 1;
    }

    &__label {
        flex: 1;
    }

    &__radio {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        z-index: 1;
        overflow: hidden;
        opacity: 0;
    }

    &--checked {
        .pure-checkbox__box {
            border-width: var(--pure-checkbox-checked-box-border-width, 0);
            border-style: var(--pure-checkbox-checked-box-border-style, var(--pure-checkbox-box-border-style, solid));
            border-color: var(--pure-checkbox-checked-box-border-color, var(--pure-checkbox-box-border-color, var(--pure-border-color-gary)));

            &::before {
                background: var(--pure-checkbox-checked-box-background, var(--pure-theme-primary));
                opacity: var(--pure-checkbox-checked-box-background-opacity, 1);
            }
        }

        .pure-checkbox__icon {
            font-size: var(--pure-checkbox-checked-icon-font-size, var(--pure-checkbox-icon-font-size, 1em));
            color: var(--pure-checkbox-checked-icon-color, rgba(255, 255, 255, 1));
            transform: var(--pure-checkbox-checked-icon-transform, scale(1));
            opacity: var(--pure-checkbox-checked-icon-opacity, 1);
        }
    }

    &--readonly {
        pointer-events: none;
    }

    &--disabled {
        pointer-events: none;
        opacity: var(--pure-checkbox-disabled-opacity, var(--pure-opacity-disabled));
    }
}